import emitter from '@/render/utils/mitt'

interface IMenuItem {
  label: string
  click: () => void
}
interface IMenuSperator {
  type: 'separator'
}

type IMenuTemplate = IMenuItem | IMenuSperator
export const projectMenuConfig: IMenuTemplate[] = [
  {
    label: '模块管理',
    click: (): void => {
      emitter.emit('open-moduleManager', 'emitter')
    }
  },
  { type: 'separator' },
  {
    label: '删除工程',
    click: (): void => {
      emitter.emit('open-delete-project', 'emitter')
    }
  },
  { type: 'separator' },
  {
    label: '驱动代码生成',
    click: (): void => {
      emitter.emit('open-generate-project-drives', 'emitter')
    }
  },
  {
    label: '参数定义文件生成',
    click: (): void => {
      emitter.emit('open-generate-project-configdef', 'emitter')
    }
  },
  {
    label: '软件包导出',
    click: (): void => {
      emitter.emit('open-generate-project', 'emitter')
    }
  }
]
